package com.sx.jys.ui.frag

import android.os.Bundle
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.gyf.immersionbar.ImmersionBar
import com.sx.jys.app.framework.BaseFragment
import com.sx.jys.app.net.HttpRequestCoroutine
import com.sx.jys.app.until.request2
import com.sx.jys.databinding.FragCkBinding
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel

class FragCk : BaseFragment<BaseViewModel, FragCkBinding>() {
    companion object {
        val instance = FragCk()
    }

    override fun initView(savedInstanceState: Bundle?) {
        (mDatabind.tvTitle.layoutParams as ViewGroup.MarginLayoutParams).let {
            it.topMargin = ImmersionBar.getStatusBarHeight(this)
        }
        val fragList = ArrayList<Fragment>()
        fragList.add(FragCkPage.getInstance("4"))
        fragList.add(FragCkPage.getInstance("0"))
        fragList.add(FragCkPage.getInstance("1"))
        fragList.add(FragCkPage.getInstance("5"))
        mDatabind.tab.setViewPager(
            mDatabind.mvp,
            arrayOf("委托订单","持仓中", "历史订单","已撤销"),
            childFragmentManager,
            fragList
        )
    }


    override fun onResume() {
        super.onResume()
    }
}